package com.discovery.dto;

import lombok.Getter;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @Author xuebinlu
 * @Date 2018/5/16 9:30
 * @Version 1.0
 * @Description XML 数据类 用来xml文本和java对象之间的转化
 **/
@XmlRootElement(name="discoverer")
public class Discoverer {
    @Getter
    @XmlElement
    private String name;//名字

    @Getter
    @XmlElement
    private int age;//年龄

    @Getter
    @XmlElement
    private boolean sex;//性别

    @Getter
    @XmlAttribute
    private String id;//成员id

    public Discoverer() {
    }

    public Discoverer(String name, int age, boolean sex, String id) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.id = id;
    }


    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public void setId(String id) {
        this.id = id;
    }
}
